import { createStore } from "vuex";
import getters from "./getters";

export default createStore({
  state: {
    username: "foo",
    age: 18,
    gender: "male",
    token: "",
    uuid:""
  },
  mutations: {
    setUsername(state, name) {
      state.username = name;
    },
    setAge(state, age) {
      state.age = age;
    },
  },
  actions: {
    updateUsername({ commit }, name) {
      commit("setUsername", name);
    },
    updateAge({ commit }, age) {
      commit("setAge", age);
    },
  },
  getters,
});
